#pragma once
#include "global.h"

class util
{
public:
	util(void);
	~util(void);
	/* Procedure printToken prints a token 
     * and its lexeme to the listing file
     */
    static void printToken(_TokenType, const char* );

    /* Function newStmtNode creates a new statement
     * node for syntax tree construction
     */
    static TreeNode * newStmtNode(StmtKind);

    /* Function newExpNode creates a new expression 
     * node for syntax tree construction
     */
    static TreeNode * newExpNode(ExpKind);

    /* Function copyString allocates and makes a new
     * copy of an existing string
     */ 
    static char * copyString( char * );

    /* procedure printTree prints a syntax tree to the 
     * listing file using indentation to indicate subtrees
     */
    static void printTree( TreeNode * );
};
